//
//  MSTestObject+C2.m
//  TestPrj
//
//  Created by 朱铅峰 on 2021/3/22.
//  Copyright © 2021 Xing. All rights reserved.
//

#import "MSTestObject+C2.h"
#import <objc/runtime.h>

@implementation MSTestObject (C2)

+ (void)load {
    
    Method superMethod = class_getInstanceMethod(self, @selector(originMethod1));
    Method categoryMethod = class_getInstanceMethod(self, @selector(swizzling1));
    method_exchangeImplementations(superMethod, categoryMethod);
    
    Method s2 = class_getInstanceMethod(self, @selector(originMethod2));
    Method c3 = class_getInstanceMethod(self, @selector(swizzling22));
    method_exchangeImplementations(s2, c3);
}

- (void)swizzling1 {
    [self swizzling1];
    NSLog(@"%s",__FUNCTION__);
}

- (void)swizzling22 {
    [self swizzling22];
    NSLog(@"%s",__FUNCTION__);
}

@end
